import Vue from 'vue'
import Vuex from 'vuex'
import {getLink} from '../api/getapi'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
      arr:[]
  },
  mutations: {
      statearr(state,payload){
        state.arr = payload
      }
  },
  actions: {
      fun(context){
          getLink("http://api.artgoer.cn:8084/artgoer/api/v1/user/324380/v3/topic/topicHomeByLabel?pageIndex=1&token=b544cd63-6d42-46fe-a96c-3cf96bae3113&topicId=62187").then((ok)=>{
              context.commit('statearr',ok.data.data.commentList)
          })
      }
  },
  modules: {
  }
})
